{% extends "devhub/addons/submit/base.html" %}

{% block title %}{{ dev_page_title(_('Describe Add-on'), addon) }}{% endblock %}

{% block primary %}
  {% set channel_param = 'listed' if version.channel == amo.CHANNEL_LISTED else 'unlisted' %}
  <h3>{{ _('Describe Version') }}</h3>
  <form method="post" id="submit-describe" class="item">
    {% csrf_token %}
    <div class="addon-submission-field">
      <label for="{{ reviewer_form.approval_notes.auto_id }}">
      {{ _('Release Notes:') }}
      </label>
      <p>{{ _("Let your users know what's new and what's changed in this version.") }}</p>
      {{ reviewer_form.release_notes.errors }}
      {{ reviewer_form.release_notes }}
      <p>{{ _('These notes will appear on the detail page.') }}</p>
    </div>
    <div class="addon-submission-field">
      <label for="{{ reviewer_form.approval_notes.auto_id }}">
      {{ _('Notes to Reviewer:') }}
      </label>
      <div class="source-submission-note">
        <p>{{ _('Is there anything our reviewers should bear in mind when reviewing this add-on?') }}</p>
        {% if sources_provided %}
          <p>
            <span class="req">{{ _('Remember') }}</span>:
            {% trans policy_requirements_open='<a href="https://extensionworkshop.com/documentation/publish/source-code-submission/?utm_source=addons.mozilla.org&utm_medium=devhub&utm_content=submission-flow">'|safe, policy_requirements_close='</a>'|safe %}
            If you submitted source code, but did not include instructions, you must provide them here.
            Enter step-by-step build instructions to create an exact copy of the add-on code, per
            {{ policy_requirements_open }}policy requirements{{ policy_requirements_close }}.
            {%- endtrans -%}
          </p>
        {% endif %}
      </div>
      {{ reviewer_form.approval_notes.errors }}
      {{ reviewer_form.approval_notes }}
      <p>{{ _('These notes will only be visible to you and our reviewers.') }}</p>
    </div>
    <div class="submission-buttons addon-submission-field">
      <button type="submit">
        {{ _('Submit Version') }}
      </button>
      &nbsp;
      <button class="button delete-button confirm-submission-cancel"
              formnovalidate
              type="button"
              formaction="{{ url('devhub.addons.cancel', addon.slug, channel_param) }}">
          {{ _('Cancel and Disable Version') }}
      </button>
    </div>
  </form>
{% endblock primary %}
